import requests
from config import url_cloud, headers_web


class LaboratoryStatistic:
    def __int__(self):
        self.url = url_cloud
        self.headers = headers_web

    @classmethod
    def post_stu_daily_appo_rate_statistics(cls, url_cloud: str, headers=headers_web, params=None, json=None):
        '''
        summary:接口-实验室学生每日预约率统计
        description:1、云课堂管理端实验室统计-实验室学生预约使用情况
        :param url_cloud:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url_cloud + "/teachinglaboratoryapi/v1/laboratorystatistics/studentdayappointmentratestatistics"
        r = requests.psot(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_stu_daily_appo_statistics(cls, url_cloud: str, headers=headers_web, params=None, json=None):
        '''
        summary:接口-实验室学生预约使用情况统计
        description:1、云课堂管理端实验室统计-实验室学生预约使用情况
        :param url_cloud:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url_cloud + "/teachinglaboratoryapi/v1/laboratorystatistics/studentappointmentstatistics"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r
